const { defineConfig } = require('@vue/cli-service');

const webpack = require("webpack"); //配置jquery

module.exports = defineConfig({
    devServer: {
        host: '0.0.0.0',
        port: 8080,
        client: {
            webSocketURL: 'ws://0.0.0.0:8080/ws',
        },
        headers: {
            'Access-Control-Allow-Origin': '*',
        }
    },
    transpileDependencies: true,
    configureWebpack: {
        plugins: [
            // 配置jQuery
            new webpack.ProvidePlugin({
                $: "jquery",
                jQuery: "jquery",
                "windows.jQuery": "jquery",
            })
        ]
    },
});